#include "common.h"
#include "init.h"
#include "communication.h"
#include "file.h"

int main(int argc , char** argv)
{
   // init(argc,argv);
    for(;;)
    {
       int len;
       char * data[1024];
       enum COMMTYPE t = recvPacket(data,&len);
       if(t== FROMISPDNS)
       {
           updateCache(data); //更新缓存
           sendPacket(); //发送包给客户
       }
       else if (t == FROMCLIENT)
       {
           if(缓存命中)
           {
               sendPacket();
           }
           else 
           丢进等待队列
           sendPacket
       }
       检查队列里最早的请求是否超时
    }
}